#include "chasis.h"

Chasis::Chasis() {
    _chasisModel = "SCOUT MINI PRO";
    _wheelBase = 451;
    _turningRadius = 0.0;
    _groundClearance = 115;
    _turningRadius = 0.0;
    _chasisId = "dp888888";
}

void Chasis::setChasisId(std::string Id) {
    _chasisId = Id;
}
void Chasis::setChasisModel(std::string model) {
    _chasisModel = model;
}
void Chasis::setWheelBase(int wheelBase) {
    _wheelBase = wheelBase;
}
void Chasis::setGroundClearance(int groundClearance) {
    _groundClearance = groundClearance;
}
void Chasis::setTurningRadius(float turningRadius) {
    _turningRadius = turningRadius;
}
void Chasis::print() {
    cout << "Chasis:" << endl;
    cout << "\tchasis Id: " << _chasisId << endl;
    cout << "\tchasisModel: " << _chasisModel << endl;
    cout << "\twheelbase: " << _wheelBase << "m" << endl;
    cout << "\tturningRadius: " << _turningRadius << "m" << endl;
}

int Chasis::save(YAML::Node& node) {
    node["Chasis"] = YAML::Node(YAML::NodeType::Map);
    node["Chasis"]["chasisId"] = _chasisId;
    node["Chasis"]["chasisModel"] = _chasisModel;
    node["Chasis"]["wheelBase"] = _wheelBase;
    node["Chasis"]["groundClearance"] = _groundClearance;
    node["Chasis"]["turningRadius"] = _turningRadius;
    return 0;
}
